package com.example.classtest.util;

import com.example.classtest.model.GoodsInfo;
import lombok.Data;

import java.util.List;

@Data
public class ResultData {
    private int succ;
    private Object data;
    private String msg;

    public static ResultData ok(Object data, String msg){
        ResultData resultData = new ResultData();
        resultData.setSucc(200);
        resultData.setData(data);
        resultData.setMsg(msg);
        return resultData;
    }

    public static ResultData fail(int succ, Object data, String msg){
        ResultData resultData = new ResultData();
        resultData.setSucc(succ);
        resultData.setData(data);
        resultData.setMsg(msg);
        return resultData;
    }
}
